Skip to content

feat(platforms): upgrade NuttX to 12.12.0#26215

Open
PetervdPerk-NXP wants to merge 7 commits into
mainfrom
pr-nuttx-12-12-0
Open

feat(platforms): upgrade NuttX to 12.12.0#26215
PetervdPerk-NXP wants to merge 7 commits into
mainfrom
pr-nuttx-12-12-0

Conversation

@PetervdPerk-NXP
Copy link
Copy Markdown
Member

@PetervdPerk-NXP PetervdPerk-NXP commented Jan 5, 2026

Continuation of #26198 but now the NuttX repo's are on the PX4 repositories.
Some reasons why to upgrade NuttX

  • Last upgrade was more then 3 years ago Aug 10, 2022
  • I3C Support has been added
  • RPmsg support for heterogenous MCU's
  • GDBStub support (for debugging over Serial/Ethernet)
  • C/C++ atomic support has been improved
  • Network stack got improved
  • Optional run-time stackchecking on IRQ/Context switch (useful for debugging)
  • CMake support (not the focus on this PR, but allows us to cleanup the build system).
  • Better RISC-V/Xtensa support.

PX4 Test Plan

Category Boot & Flash SD Card CAN/UAVCAN Radio Modes Parameters Ethernet XRCE-DDS USB/QGC Hardfault Logging CPU Load Publication Rates Mavlink
Description Flash PX4 firmware and verify boot Run sd_bench and measure write speed Check UAVCAN node and CAN1 status Bind and verify RC input Arm in Stabilized mode, verify leveling Change parameters and reset to defaults Verify Ethernet connectivity Receive visual odometry messages via XRCE-DDS Verify USB connection and QGC link Trigger and verify hardfault logging Run top when the system is armed Run uorb top when the system is armed Run mavlink status
Expectation PX4 boots without errors Check Avg ≥ 400 KB/s, max write ≤ 50 ms No HW/IO errors, RX/TX frames increment RC channels update in QGC Craft attempts to level (bench OK) Changes persist, reset works PX4 responds to pings, MAVLink over Ethernet VO messages visible in PX4 logs QGC connects and parameters sync correctly Hardfault log saved and retrievable CPU load is similar Publication rates TX/RX rate and latency for all MAVLink instances
CUAV V6X Okay Okay Okay Okay Okay Okay Okay Okay
Pixhawk 6X
Pixhawk 6X-RT

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 5, 2026

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 5336 byte (0.25 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.2% +3.10Ki  +0.2% +3.10Ki    .text
 -94.5% +8.00Ki -94.5% +8.00Ki    [1609 Others]
  [NEW] +2.03Ki  [NEW] +2.03Ki    vscanf_internal
  [NEW]    +936  [NEW]    +936    strtox.isra.0
  [NEW]    +912  [NEW]    +912    uart_readv
 +57e2%    +684 +57e2%    +684    _assert
  [NEW]    +628  [NEW]    +628    nsh_argument.isra.0
  +135%    +628  +135%    +628    strftime
  [NEW]    +614  [NEW]    +614    mmcsd_sdinitialize
  [NEW]    +484  [NEW]    +484    uart_writev
  [NEW]    +390  [NEW]    +390    fat_get_sectors
 -43.8%    -352 -43.8%    -352    mmcsd_probe
 -98.9%    -364 -98.9%    -364    strtod
  [DEL]    -390  [DEL]    -390    nx_poll
  [DEL]    -492  [DEL]    -492    uart_read
  [DEL]    -532  [DEL]    -532    up_assert
  [DEL]    -588  [DEL]    -588    cmd_ifconfig
  [DEL]    -940  [DEL]    -940    ps_callback
  [DEL] -1.24Ki  [DEL] -1.24Ki    nsh_argument
  [DEL] -1.71Ki  [DEL] -1.71Ki    proc_read
 -98.9% -1.79Ki -98.9% -1.79Ki    lib_vscanf
  -2.3% -3.77Ki  -2.3% -3.77Ki    [section .text]
 +43% +1.70Ki   +43% +1.70Ki    .data
 -59.3%    +468 -59.3%    +468    [45 Others]
   +50%    +192   +50%    +192    g_dma
  +460%     +92  +460%     +92    g_hpwork
  +460%     +92  +460%     +92    g_lpwork
  [NEW]     +88  [NEW]     +88    g_wrbuffer
   +26%     +60   +26%     +60    g_uart4priv
   +26%     +60   +26%     +60    g_uart5priv
   +26%     +60   +26%     +60    g_uart7priv
   +26%     +60   +26%     +60    g_uart8priv
   +26%     +60   +26%     +60    g_usart1priv
   +26%     +60   +26%     +60    g_usart2priv
   +26%     +60   +26%     +60    g_usart3priv
   +26%     +60   +26%     +60    g_usart6priv
  [NEW]     +44  [NEW]     +44    g_cbprealloc
  [NEW]     +44  [NEW]     +44    g_icmp_connections
  [NEW]     +44  [NEW]     +44    g_tcp_connections
  [NEW]     +44  [NEW]     +44    g_udp_connections
  [NEW]     +40  [NEW]     +40    g_devno_lock
  [NEW]     +40  [NEW]     +40    g_free_lock
  +250%     +40  +250%     +40    g_inode_lock
   +43%     +36   +43%     +36    g_spi1dev
[ = ]       0  +1.3% +1.16Ki    .bss
  [ = ]       0  [NEW] +4.88Ki    g_iob_buffer
  [ = ]       0  [NEW] +1.91Ki    g_tcp_connections_buffer
  [ = ]       0  [NEW] +1.25Ki    g_wrbuffer_buffer
  [ = ]       0  [NEW]    +704    g_udp_connections_buffer
  [ = ]       0  [NEW]    +480    g_kthread_group
  [ = ]       0  [NEW]    +448    g_sigpool
  [ = ]       0  [NEW]    +288    g_icmp_connections_buffer
  [ = ]       0  [NEW]    +216    g_last_regs
  [ = ]       0  [NEW]    +112    g_sigactions
  [ = ]       0 -98.5%     +96    [52 Others]
  [ = ]       0  [NEW]     +96    g_cbprealloc_buffer
  [ = ]       0  [NEW]     +64    g_tasklisttable
  [ = ]       0   +75%     +60    g_bbsram
  [ = ]       0  [DEL]     -64    g_iobuserstats
  [ = ]       0  [DEL]    -224    g_icmp_connections
  [ = ]       0  [DEL]    -384    g_cbprealloc
  [ = ]       0  [DEL]    -448    g_dns_cache
  [ = ]       0  [DEL]    -704    g_udp_connections
  [ = ]       0  [DEL] -1.22Ki    g_wrbuffer
  [ = ]       0  [DEL] -1.50Ki    g_tcp_connections
  [ = ]       0  [DEL] -4.88Ki    g_iob_pool
+3.7% +73.1Ki  [ = ]       0    .debug_abbrev
+0.9% +1.52Ki  [ = ]       0    .debug_aranges
+1.0% +4.77Ki  [ = ]       0    .debug_frame
+4.0% +1.10Mi  [ = ]       0    .debug_info
+3.4%  +178Ki  [ = ]       0    .debug_line
  [DEL]      -6  [ = ]       0    [Unmapped]
  +3.4%  +178Ki  [ = ]       0    [section .debug_line]
+2.5%     +10  [ = ]       0    .debug_line_str
+1.1% +39.0Ki  [ = ]       0    .debug_loclists
  [NEW]      +3  [ = ]       0    [Unmapped]
  +1.1% +39.0Ki  [ = ]       0    [section .debug_loclists]
+0.8% +4.98Ki  [ = ]       0    .debug_rnglists
  [DEL]      -1  [ = ]       0    [Unmapped]
  +0.8% +4.98Ki  [ = ]       0    [section .debug_rnglists]
+0.1% +4.95Ki  [ = ]       0    .debug_str
  [NEW]      +1  [ = ]       0    [Unmapped]
  +0.1% +4.95Ki  [ = ]       0    [section .debug_str]
+0.8%      +2  [ = ]       0    .shstrtab
-0.0%    -290  [ = ]       0    .strtab
  [DEL]     -10  [ = ]       0    CSWTCH.45
  [DEL]      -9  [ = ]       0    CSWTCH.5
 -100.2%     -15  [ = ]       0    [870 Others]
  -0.3%     -81  [ = ]       0    [section .strtab]
  [DEL]     -15  [ = ]       0    __FUNCTION__.0
  [DEL]     -15  [ = ]       0    __FUNCTION__.1
  [DEL]     -15  [ = ]       0    __FUNCTION__.2
  [DEL]     -15  [ = ]       0    __FUNCTION__.3
  [DEL]     -15  [ = ]       0    __FUNCTION__.4
  [DEL]     -15  [ = ]       0    __FUNCTION__.5
 -26.7%     -16  [ = ]       0    ___ZL19param_get_cplusplustPf.isra.0_veneer
  [DEL]     -26  [ = ]       0    ____aeabi_uldivmod_veneer
  [NEW]     +18  [ = ]       0    ____assert_veneer
  [NEW]     +21  [ = ]       0    __arm_ack_irq_veneer
  [DEL]     -27  [ = ]       0    __arm_switchcontext_veneer
  [DEL]     -19  [ = ]       0    __arp_arpin_veneer
  [NEW]     +19  [ = ]       0    __arp_input_veneer
  [DEL]     -18  [ = ]       0    __arp_ipin_veneer
  [DEL]     -17  [ = ]       0    __arp_out_veneer
  [NEW]      +9  [ = ]       0    __assert
  [DEL]     -29  [ = ]       0    __clock_abstime2ticks_veneer
-0.1%    -832  [ = ]       0    .symtab
 -25.0%     -16  [ = ]       0    AM32Settings::decodeInfoResponse()
   +33%     +16  [ = ]       0    AuterionAutostarter::is_eeprom_header_valid()
 -50.0%     -16  [ = ]       0    AuterionAutostarter::start()
  +100%     +32  [ = ]       0    CSWTCH.42
  [DEL]     -32  [ = ]       0    CSWTCH.45
  [DEL]     -32  [ = ]       0    CSWTCH.5
  +100%     +16  [ = ]       0    CdcAcmAutostart::execute_process()
 -25.0%     -16  [ = ]       0    CdcAcmAutostart::scan_buffer_for_carriage_returns()
  +100%     +16  [ = ]       0    MavlinkStream::update()
  +100%     +16  [ = ]       0    MavlinkStreamAutopilotStateForGimbalDevice::send()
 -25.0%     -16  [ = ]       0    MavlinkStreamBatteryInfo::send()
 -14.3%     -16  [ = ]       0    MavlinkStreamServoOutputRaw<>::new_instance()
 -33.3%     -16  [ = ]       0    PX4IO::updateDisarmed()
  +100%     +16  [ = ]       0    PX4IO::updateFailsafe()
   +50%     +16  [ = ]       0    SensorGpsSim::generate_wgn()
 -33.3%     -16  [ = ]       0    SensorGpsSim::generate_wgn()::S
 -102.6% -1.11Ki  [ = ]       0    [1216 Others]
  +4.5%    +512  [ = ]       0    [section .symtab]
  [DEL]     -80  [ = ]       0    __FUNCTION__.0
  [DEL]     -48  [ = ]       0    __FUNCTION__.1
  [DEL]     -32  [ = ]       0    __FUNCTION__.2
 +17% +1.66Ki  [ = ]       0    [Unmapped]
-5.3%    -776  -5.3%    -776    .ramfunc
  +139%    +100  +139%    +100    nxsched_add_readytorun
   +13%     +76   +13%     +76    stm32_interrupt_work
  +120%     +72  +120%     +72    wd_timer
  +133%     +64  +133%     +64    arm_doirq
  +214%     +60  +214%     +60    nxsched_remove_blocked
   +93%     +56   +93%     +56    ioctl
  +120%     +48  +120%     +48    nxsched_remove_readytorun
   +11%     +44   +11%     +44    stm32_i2c_isr
 -100.6%     -32 -100.6%     -32    [73 Others]
  [DEL]     -40  [DEL]     -40    nxsched_add_blocked
 -97.8%     -44 -97.8%     -44    [section .ramfunc]
 -91.7%     -44 -91.7%     -44    arm_svcall
  [DEL]     -44  [DEL]     -44    sq_rem
  [DEL]     -64  [DEL]     -64    nxsched_add_prioritized
 -51.3%     -80 -51.3%     -80    nxsem_post
  [DEL]     -84  [DEL]     -84    up_unblock_task
  [DEL]    -112  [DEL]    -112    up_block_task
 -88.9%    -128 -88.9%    -128    memset
  [DEL]    -184  [DEL]    -184    wd_start
 -35.6%    -188 -35.6%    -188    memcpy
  [DEL]    -252  [DEL]    -252    nxsig_timedwait
+3.1% +1.40Mi  +0.3% +5.21Ki    TOTAL

px4_fmu-v6x [Total VM Diff: 7400 byte (0.36 %)]
    FILE SIZE        VM SIZE    
--------------  -------------- 
+0.2% +3.63Ki  +0.2% +3.63Ki    .text
 -94.3% +8.58Ki -94.3% +8.58Ki    [1646 Others]
  [NEW] +2.03Ki  [NEW] +2.03Ki    vscanf_internal
  [NEW]    +936  [NEW]    +936    strtox.isra.0
  [NEW]    +912  [NEW]    +912    uart_readv
 +57e2%    +684 +57e2%    +684    _assert
  [NEW]    +628  [NEW]    +628    nsh_argument.isra.0
  +135%    +628  +135%    +628    strftime
  [NEW]    +614  [NEW]    +614    mmcsd_sdinitialize
  [NEW]    +484  [NEW]    +484    uart_writev
  [NEW]    +390  [NEW]    +390    fat_get_sectors
 -43.8%    -352 -43.8%    -352    mmcsd_probe
 -98.9%    -364 -98.9%    -364    strtod
  [DEL]    -390  [DEL]    -390    nx_poll
  [DEL]    -492  [DEL]    -492    uart_read
  [DEL]    -532  [DEL]    -532    up_assert
  [DEL]    -588  [DEL]    -588    cmd_ifconfig
  [DEL]    -940  [DEL]    -940    ps_callback
  [DEL] -1.24Ki  [DEL] -1.24Ki    nsh_argument
  [DEL] -1.71Ki  [DEL] -1.71Ki    proc_read
 -98.9% -1.79Ki -98.9% -1.79Ki    lib_vscanf
  -2.4% -3.82Ki  -2.4% -3.82Ki    [section .text]
 +45% +2.05Ki   +45% +2.05Ki    .data
  +170%    +544  +170%    +544    g_sdmmcdev2
 -57.7%    +464 -57.7%    +464    [44 Others]
  +460%     +92  +460%     +92    g_hpwork
  +460%     +92  +460%     +92    g_lpwork
  [NEW]     +88  [NEW]     +88    g_wrbuffer
   +26%     +60   +26%     +60    g_uart4priv
   +26%     +60   +26%     +60    g_uart5priv
   +26%     +60   +26%     +60    g_uart7priv
   +26%     +60   +26%     +60    g_uart8priv
   +26%     +60   +26%     +60    g_usart1priv
   +26%     +60   +26%     +60    g_usart2priv
   +26%     +60   +26%     +60    g_usart3priv
   +26%     +60   +26%     +60    g_usart6priv
  [NEW]     +44  [NEW]     +44    g_cbprealloc
  [NEW]     +44  [NEW]     +44    g_icmp_connections
  [NEW]     +44  [NEW]     +44    g_tcp_connections
  [NEW]     +44  [NEW]     +44    g_udp_connections
  [NEW]     +40  [NEW]     +40    g_devno_lock
  [NEW]     +40  [NEW]     +40    g_free_lock
  +250%     +40  +250%     +40    g_inode_lock
  [NEW]     +40  [NEW]     +40    g_nshprompt
[ = ]       0  +1.6% +1.55Ki    .bss
  [ = ]       0  [NEW] +4.88Ki    g_iob_buffer
  [ = ]       0  [NEW] +1.91Ki    g_tcp_connections_buffer
  [ = ]       0  [NEW] +1.28Ki    g_kthread_group
  [ = ]       0  [NEW] +1.25Ki    g_wrbuffer_buffer
  [ = ]       0  [NEW]    +704    g_udp_connections_buffer
  [ = ]       0  [NEW]    +448    g_sigpool
  [ = ]       0  [NEW]    +288    g_icmp_connections_buffer
  [ = ]       0 -95.9%    +228    [53 Others]
  [ = ]       0  [NEW]    +216    g_last_regs
  [ = ]       0  [NEW]    +112    g_sigactions
  [ = ]       0  [NEW]     +96    g_cbprealloc_buffer
  [ = ]       0   +76%     +64    g_bbsram
  [ = ]       0  [DEL]     -64    g_iobuserstats
  [ = ]       0  [DEL]    -224    g_icmp_connections
  [ = ]       0  [DEL]    -384    g_cbprealloc
  [ = ]       0  [DEL]    -448    g_dns_cache
  [ = ]       0  [DEL]    -512    sdmmc_rxbuffer
  [ = ]       0  [DEL]    -704    g_udp_connections
  [ = ]       0  [DEL] -1.22Ki    g_wrbuffer
  [ = ]       0  [DEL] -1.50Ki    g_tcp_connections
  [ = ]       0  [DEL] -4.88Ki    g_iob_pool
+4.9% +92.2Ki  [ = ]       0    .debug_abbrev
+1.1% +1.76Ki  [ = ]       0    .debug_aranges
+1.1% +5.19Ki  [ = ]       0    .debug_frame
+4.7% +1.24Mi  [ = ]       0    .debug_info
+3.7%  +189Ki  [ = ]       0    .debug_line
  [NEW]      +1  [ = ]       0    [Unmapped]
  +3.7%  +189Ki  [ = ]       0    [section .debug_line]
+2.5%     +10  [ = ]       0    .debug_line_str
+1.2% +41.5Ki  [ = ]       0    .debug_loclists
  [NEW]      +2  [ = ]       0    [Unmapped]
  +1.2% +41.5Ki  [ = ]       0    [section .debug_loclists]
+0.9% +5.24Ki  [ = ]       0    .debug_rnglists
+0.2% +5.30Ki  [ = ]       0    .debug_str
  [NEW]      +3  [ = ]       0    [Unmapped]
  +0.2% +5.30Ki  [ = ]       0    [section .debug_str]
+0.4%      +1  [ = ]       0    .shstrtab
+0.0%    +227  [ = ]       0    .strtab
  [DEL]     -10  [ = ]       0    CSWTCH.45
  [DEL]      -9  [ = ]       0    CSWTCH.5
 -96.1%    +275  [ = ]       0    [828 Others]
  +0.4%     +94  [ = ]       0    [section .strtab]
  [DEL]     -15  [ = ]       0    __FUNCTION__.0
  [DEL]     -15  [ = ]       0    __FUNCTION__.1
  [DEL]     -15  [ = ]       0    __FUNCTION__.2
  [DEL]     -15  [ = ]       0    __FUNCTION__.3
  [DEL]     -15  [ = ]       0    __FUNCTION__.4
  [DEL]     -15  [ = ]       0    __FUNCTION__.5
  [NEW]      +9  [ = ]       0    __assert
   +28%      +9  [ = ]       0    __orb_position_controller_landing_status
 -81.8%      -9  [ = ]       0    __start
  [DEL]     -15  [ = ]       0    _net_timedwait
 -45.7%     -16  [ = ]       0    _vectors
  [NEW]      +7  [ = ]       0    adjust
  [NEW]     +15  [ = ]       0    arc4random_buf
  [NEW]     +19  [ = ]       0    arm_color_intstack
  [DEL]     -15  [ = ]       0    arm_dump_stack
  [DEL]     -14  [ = ]       0    arm_dump_task
  [DEL]     -23  [ = ]       0    arm_fullcontextrestore
+0.0%     +16  [ = ]       0    .symtab
 -25.0%     -16  [ = ]       0    AM32Settings::decodeInfoResponse()
  +100%     +32  [ = ]       0    CSWTCH.42
  [DEL]     -32  [ = ]       0    CSWTCH.45
  [DEL]     -32  [ = ]       0    CSWTCH.5
  +100%     +16  [ = ]       0    CdcAcmAutostart::execute_process()
 -25.0%     -16  [ = ]       0    CdcAcmAutostart::scan_buffer_for_carriage_returns()
  +100%     +16  [ = ]       0    MavlinkStream::update()
 -14.3%     -16  [ = ]       0    MavlinkStreamServoOutputRaw<>::new_instance()
 -33.3%     -16  [ = ]       0    PX4IO::updateDisarmed()
  +100%     +16  [ = ]       0    PX4IO::updateFailsafe()
 -99.9%     +48  [ = ]       0    [1152 Others]
  +2.4%    +272  [ = ]       0    [section .symtab]
  [DEL]    -128  [ = ]       0    __FUNCTION__.0
  [DEL]     -48  [ = ]       0    __FUNCTION__.1
  [DEL]     -32  [ = ]       0    __FUNCTION__.2
  [DEL]     -32  [ = ]       0    __FUNCTION__.3
  [DEL]     -32  [ = ]       0    __FUNCTION__.4
  [DEL]     -32  [ = ]       0    __FUNCTION__.5
  [NEW]     +48  [ = ]       0    __assert
   +25%     +16  [ = ]       0    __dtoa_engine
 -25.0%     -16  [ = ]       0    __errno
+8.7%    +376  [ = ]       0    [Unmapped]
+3.6% +1.58Mi  +0.4% +7.23Ki    TOTAL

Updated: 2026-04-01T12:19:51

@alexcekay
Copy link
Copy Markdown
Member

Hi @PetervdPerk-NXP, @AlexKlimaj,

This is a very large change (around 5,000 commits in NuttX and many changes in the common code), and to be honest I’m not particularly excited about the approach:

Asked github copilot with Claude Sonnet 4.5 to replace the PX4 Nuttx submodule with upstream NuttX.

Especially when this then requires patching and reviewing fixes like the following just to get things running:

# Add delay after format for SD card to be ready (NuttX 12)
usleep 100000
[...]
# Try one more time with additional delay
usleep 200000

This kind of patching being needed already shows that interfaces don't behave the same anymore and we need to understand this and not start patching until it somehow works. This one was detected, but I am very sure there are a lot more of those "quirks" that will occur less often and only in specific situations.

Don’t get me wrong, I like the idea of us staying up to date with NuttX. However, with a migration that appears to be largely AI-driven, it effectively shifts a significant amount of risk and workload onto the reviewers and flight testers. They now need to ensure that no low-level or timing-related issues are introduced that might only show up sporadically in real operation.

With that in mind, I’d like to ask a few questions:

  • What do we gain by updating to NuttX 12.12.0 at this point? Is there a specific feature, fix, or requirement that makes this update necessary right now?
    • Given the chosen approach, I see a real risk of subtle interface or behavior changes in NuttX that could lead to time-consuming bugs later, and that may not have been considered during the AI-assisted migration
  • This will require serious testing. Can you coordinate with PX4 flight testers and your in-house testing resources to get a substantial number of testing hours before we move forward?

@PetervdPerk-NXP
Copy link
Copy Markdown
Member Author

PetervdPerk-NXP commented Jan 5, 2026

Hi @alexcekay,
I used #26198 as the baseline since it showed we could get to NuttX 12.12.0 with ~400 lines of changes. I reviewed and applied the updates manually and refactored out most of the "weird" changes from #26198 as well.

I kept the timeout change you're referring to in since @AlexKlimaj observed issues on his hardware that I can’t reproduce on our V6X-RT FMU but overall that's the reason this PR is a draft. Most likely it has to do with the rejected fat dma allocation patches which weren't in the #26198 attempt. Edit: Timeout change not needed anymore, also working on ARK hardware.

Beyond Kconfig symbol churn, the PR is quite modest. My reason to upgrade is primarily to enable i.MX93/i.MX95 hardware, which depends on a more mature RPMsg that we can’t realistically backport from our 2-3 year old NuttX. But they're are various other improvements NuttX brings which makes it worthwhile to upgrade.

I sense some hesitation about upgrading. If we intend to stay on the current kernel long‑term, the migration cost will only grow. I’m happy to help push this over the line, as I did myself with the previous kernel bump 2 years ago aswell, but I’d appreciate alignment and some shared ownership. If you’d prefer I step back and focus elsewhere, let me know.

@alexcekay
Copy link
Copy Markdown
Member

alexcekay commented Jan 5, 2026

Hi @PetervdPerk-NXP,

Thanks for explaining your rationale and pushing this topic.

I sense some hesitation about upgrading

No, as stated: Don’t get me wrong, I like the idea of us staying up to date with NuttX and appreciate

I’m happy to help push this over the line, as I did myself with the previous kernel bump 2 years ago as well

I am hesitant about the risk associated with any larger OS change (and the hours needed to debug the issues afterwards) and thus want to de-risk this and emphasize:

This will require serious testing. Can you coordinate with PX4 flight testers and your in-house testing resources to get a substantial number of testing hours before we move forward?

When this has a sort of mature state where strange quirks are not needed anymore or are at least clearly understood I would be happy to assist in reviewing it and do testing with our HW.

@PetervdPerk-NXP PetervdPerk-NXP force-pushed the pr-nuttx-12-12-0 branch 5 times, most recently from 845fc70 to f6d73d0 Compare January 5, 2026 19:09
@AlexKlimaj
Copy link
Copy Markdown
Member

ARKV6X is booting and sd card works. Doesn't look like free or ps commands work.

[boot] Rev 0x1 : Ver 0x1 ARKV6X001
reset done, 10 ms
[boot]
Fault Log info File No 4 Length 3177 flags:0x01 state:1
[boot]
Fault Log is Armed
HW arch: ARK_FMU_V6X
HW type: ARKV6X
HW FMUM ID: 0x001
HW BASE ID: 0x001
PX4 git-hash: f6d73d0bacd239501747f5987f09b1ba9b86f152
PX4 version: 1.17.0 40 (17891392)
PX4 git-branch: pr-nuttx-12-12-0
OS: NuttX
OS version: Release 12.12.0 (202113279)
OS git-hash: 62ff1b8c59f2ebf1a570126bed0caa326a780701
Build datetime: Jan  5 2026 13:49:00
Build uri: localhost
Build variant: default
Toolchain: GNU GCC, 10.2.1 20201103 (release)
PX4GUID: 000600000000363334373333510f0024003c
MCU: STM32H7[4|5]xxx, rev. V
ERROR [bsondump] open '/fs/mtd_caldata' failed (2)
New /fs/mtd_caldata size is:
ERROR [bsondump] open '/fs/mtd_caldata' failed (2)
INFO  [param] selected parameter default file /fs/mtd_params
INFO  [param] importing from '/fs/mtd_params'
INFO  [parameters] BSON document size 621 bytes, decoded 621 bytes (INT32:14, FLOAT:15)
INFO  [param] selected parameter backup file /fs/microsd/parameters_backup.bson
Board architecture defaults: /etc/init.d/rc.board_arch_defaults
Board defaults: /etc/init.d/rc.board_defaults
Loading airframe: /etc/init.d/airframes/4001_quad_x
INFO  [dataman] data manager file '/fs/microsd/dataman' size is 128528 bytes
Board sensors: /etc/init.d/rc.board_sensors
INFO  [ina226] Failed to init INA226 on bus 1, but will try again periodically.
ina226 #0 on I2C bus 1 (external) address 0x41
INFO  [ina226] Failed to init INA226 on bus 2, but will try again periodically.
ina226 #1 on I2C bus 2 (external) address 0x41
INFO  [ina226] Failed to init INA226 on bus 3, but will try again periodically.
ina226 #2 on I2C bus 3 (external) address 0x41
iim42653 #0 on SPI bus 1 rotation 3
iim42653 #1 on SPI bus 2 rotation 9
iim42653 #2 on SPI bus 3 rotation 6
bmm150 #0 on I2C bus 4 (external) address 0x10
bmp390 #0 on I2C bus 4 (external) address 0x76
ekf2 [596:237]
INFO  [px4io] PX4IO Not Supported
Starting Main GPS on /dev/ttyS0
Starting MAVLink on /dev/ttyS6
INFO  [mavlink] mode: Normal, data rate: 1200 B/s on /dev/ttyS6 @ 57600B
Starting MAVLink on ethernet
INFO  [mavlink] mode: Normal, data rate: 100000 B/s on udp port 14550 remote port 14550
INFO  [cdcacm_autostart] Starting CDC/ACM autostart
INFO  [logger] logger started (mode=all)
INFO  [uavcan] Node ID 1, bitrate 1000000
sercon: Registering CDC/ACM serial driver
sercon: Successfully registered the CDC/ACM serial driver

NuttShell (NSH) NuttX-12.12.0
nsh> WARN  [health_and_arming_checks] Preflight Fail: ekf2 missing data
INFO  [cdcacm_autostart] Starting mavlink on /dev/ttyACM0 (SYS_USB_AUTO=2)
INFO  [mavlink] mode: Onboard, data rate: 100000 B/s on /dev/ttyACM0 @ 2000000B
INFO  [uavcan] advertising node_id 120 on index 0
INFO  [gyro_calibration] gyro 1 (3014674) updating offsets [-0.013, -0.012, 0.028]->[-0.005, -0.012, 0.021] 25.2 degC
uavcan_gnss adding channel for topic sensor_gps node 120...
uavcan_gnss node 120 instance 0 ok
uavcan_gnss node 120 topic sensor_gps instance 0 ok
uavcan_mag adding channel for topic sensor_mag node 120...
uavcan_mag channel 120 instance 1 ok
WARN  [uavcan] GNSS Fix2 msg detected for ch 0; disabling Fix msg for this node
WARN  [health_and_arming_checks] Preflight: GPS fix too low
INFO  [vehicle_magnetometer] MAG switch from #0 -> #1
WARN  [health_and_arming_checks] Preflight Fail: Strong magnetic interference
WARN  [health_and_arming_checks] Preflight: GPS fix too low
WARN  [health_and_arming_checks] Preflight Fail: Compass 1 uncalibrated

nsh>
nsh>
nsh>
nsh> sd_bench
INFO  [sd_bench] Using block size = 4096 bytes, sync=0
INFO  [sd_bench]
INFO  [sd_bench] Testing Sequential Write Speed...
INFO  [sd_bench]   Run  0:   363.19 KB/s, max write time: 104 ms (=  38.46 KB/s), fsync: 48 ms
INFO  [sd_bench]   Run  1:   398.10 KB/s, max write time: 37 ms (= 108.11 KB/s), fsync: 56 ms
INFO  [sd_bench]   Run  2:   399.99 KB/s, max write time: 19 ms (= 210.53 KB/s), fsync: 48 ms
INFO  [sd_bench]   Run  3:   394.94 KB/s, max write time: 38 ms (= 105.26 KB/s), fsync: 46 ms
INFO  [sd_bench]   Run  4:   399.31 KB/s, max write time: 19 ms (= 210.53 KB/s), fsync: 47 ms
INFO  [sd_bench]   Avg   :   391.12 KB/s
INFO  [sd_bench]   Overall max write time: 104 ms
nsh>
 PID COMMAND                   CPU(ms) CPU(%)  USED/STACK PRIO(BASE) STATE FD
   0 Idle_Task                   27595 53.213   272/  768   0 (  0)  READY  8
   1 hpwork                          0  0.000   336/ 1216 249 (249)  w:sem  8
   2 lpwork                          0  0.000   336/ 1568  50 ( 50)  w:sem  8
   3 nsh_main                        0  0.000  2024/ 3152 100 (100)  w:sem  8
   4 wq:manager                      0  0.000   368/ 1240 255 (255)  w:sem  8
   5 wq:lp_default                   7  0.264  1552/ 3480 205 (205)  w:sem  8
   6 netinit                         5  0.000   664/ 2032  49 ( 49)  w:sem  8
1235 mavlink_rcv_if1                 4  0.175  2272/ 6200 175 (175)  w:sem  8
 264 wq:hp_default                  99  3.622  1312/ 2784 237 (237)  w:sem  8
 365 dataman                         0  0.001  1072/ 1384  90 ( 90)  w:sem  8
 427 wq:I2C1                         4  0.145  1024/ 2320 246 (246)  w:sem  8
 430 wq:I2C2                         4  0.143   856/ 2320 245 (245)  w:sem  8
 439 wq:I2C3                         4  0.143   880/ 2320 244 (244)  w:sem  8
 458 wq:SPI1                       151  5.570  1832/ 2376 253 (253)  PEND   8
 463 wq:SPI2                       163  6.007  1832/ 2376 252 (252)  PEND   8
 476 wq:SPI3                        79  2.909  1832/ 2376 251 (251)  PEND   8
 492 wq:I2C4                         5  0.192   904/ 2320 243 (243)  w:sem  8
 592 wq:nav_and_controllers        113  4.123  1280/ 2224 242 (242)  w:sem  8
 593 wq:rate_ctrl                  108  3.962  2328/ 3128 255 (255)  w:sem  8
 594 wq:INS0                       181  6.647  3824/ 5984 241 (241)  w:sem  8
 629 commander                      14  0.526  1624/ 3200 140 (140)  w:sig  8
 794 gps                             1  0.105  1040/ 1944 205 (205)  w:sem  8
 926 mavlink_if0                    31  1.156  1784/ 3056 100 (100)  w:sig  8
 927 mavlink_rcv_if0                 4  0.155  2552/ 6200 175 (175)  w:sem  8
1017 mavlink_if1                    96  3.473  1808/ 3056 100 (100)  READY  8
1076 navigator                       2  0.092  1616/ 2176 105 (105)  w:sem 16
1159 logger                          4  0.156  3056/ 3616 230 (230)  w:sem  8
1174 log_writer_file                 0  0.000   384/ 1152  60 ( 60)  w:sem  8
1179 wq:uavcan                      38  1.389  3168/ 3608 236 (236)  w:sem  8
1208 mavlink_if2                   118  4.319  1784/ 3144 100 (100)  w:sig  8
1213 mavlink_rcv_if2                 3  0.144  2216/ 6200 175 (175)  w:sem  8
1257 top                             4  0.187  2336/ 4064 237 (237)  RUN    8

Processes: 32 total, 6 running, 26 sleeping
CPU usage: 45.61% tasks, 1.18% sched, 53.21% idle
DMA Memory: 5120 total, 1024 used 1536 peak
Uptime: 102.365s total, 27.595s idle

nsh> free
nsh> ps a
nsh> ps

@AlexKlimaj
Copy link
Copy Markdown
Member

Confirmed ethernet is working on the ARKV6X.

@PetervdPerk-NXP
Copy link
Copy Markdown
Member Author

ARKV6X is booting and sd card works.

Good to hear SD card works, I've already removed the delay fuctions from the previous PR in rcs, good to know that's not needed anymore.

Doesn't look like free or ps commands work.

This is a bit weird, maybe procfs doesn't properly mount, does help show the commands?

Confirmed ethernet is working on the ARKV6X.

Awesome thanks for testing.

@henrykotze
Copy link
Copy Markdown
Collaborator

Im also interested in upgrading Nuttx. Happy to assist in bench testing and flight testing to get this over the line confidently.

What I will test on my bench so long. I hope to report back in the next week.
ESP32
Holybro v6x
CUAV v6x
Cube Orange Plus

@PetervdPerk-NXP PetervdPerk-NXP force-pushed the pr-nuttx-12-12-0 branch 8 times, most recently from 91f6a29 to 99280e0 Compare January 7, 2026 14:53
@github-actions github-actions Bot added scope:middleware DDS, ROS 2, Cyphal/UAVCAN, zenoh, or bridge layers. scope:parameters Parameter definitions, metadata, migration, or defaults. scope:boards Board-specific changes or hardware definitions. labels May 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🔎 FLASH Analysis

px4_fmu-v5x [Total VM Diff: 3884 byte (0.18 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +43% +1.70Ki   +43% +1.70Ki    .data
   -59.6%    +464 -59.6%    +464    [44 Others]
     +50%    +192   +50%    +192    g_dma
    +460%     +92  +460%     +92    g_hpwork
    +460%     +92  +460%     +92    g_lpwork
    [NEW]     +88  [NEW]     +88    g_wrbuffer
     +26%     +60   +26%     +60    g_uart4priv
     +26%     +60   +26%     +60    g_uart5priv
     +26%     +60   +26%     +60    g_uart7priv
     +26%     +60   +26%     +60    g_uart8priv
     +26%     +60   +26%     +60    g_usart1priv
     +26%     +60   +26%     +60    g_usart2priv
     +26%     +60   +26%     +60    g_usart3priv
     +26%     +60   +26%     +60    g_usart6priv
    [NEW]     +44  [NEW]     +44    g_cbprealloc
    [NEW]     +44  [NEW]     +44    g_icmp_connections
    [NEW]     +44  [NEW]     +44    g_tcp_connections
    [NEW]     +44  [NEW]     +44    g_udp_connections
    [NEW]     +40  [NEW]     +40    g_devno_lock
    [NEW]     +40  [NEW]     +40    g_free_lock
    +250%     +40  +250%     +40    g_inode_lock
     +43%     +36   +43%     +36    g_spi1dev
  +0.1% +1.69Ki  +0.1% +1.69Ki    .text
   -95.0% +7.67Ki -95.0% +7.67Ki    [1620 Others]
    [NEW] +2.03Ki  [NEW] +2.03Ki    vscanf_internal
    [NEW]    +936  [NEW]    +936    strtox.isra.0
    [NEW]    +912  [NEW]    +912    uart_readv
   +57e2%    +684 +57e2%    +684    _assert
    [NEW]    +628  [NEW]    +628    nsh_argument.isra.0
    [NEW]    +610  [NEW]    +610    mmcsd_sdinitialize
    [NEW]    +484  [NEW]    +484    uart_writev
    [NEW]    +390  [NEW]    +390    fat_get_sectors
    [DEL]    -352  [DEL]    -352    telnetd_daemon
   -98.9%    -364 -98.9%    -364    strtod
   -46.8%    -376 -46.8%    -376    mmcsd_probe
    [DEL]    -390  [DEL]    -390    nx_poll
    [DEL]    -492  [DEL]    -492    uart_read
    [DEL]    -532  [DEL]    -532    up_assert
    [DEL]    -588  [DEL]    -588    cmd_ifconfig
    [DEL]    -940  [DEL]    -940    ps_callback
    [DEL] -1.24Ki  [DEL] -1.24Ki    nsh_argument
    [DEL] -1.71Ki  [DEL] -1.71Ki    proc_read
   -98.9% -1.79Ki -98.9% -1.79Ki    lib_vscanf
    -2.4% -3.87Ki  -2.4% -3.87Ki    [section .text]
  [ = ]       0  +1.3% +1.16Ki    .bss
    [ = ]       0  [NEW] +4.88Ki    g_iob_buffer
    [ = ]       0  [NEW] +1.91Ki    g_tcp_connections_buffer
    [ = ]       0  [NEW] +1.25Ki    g_wrbuffer_buffer
    [ = ]       0  [NEW]    +704    g_udp_connections_buffer
    [ = ]       0  [NEW]    +480    g_kthread_group
    [ = ]       0  [NEW]    +448    g_sigpool
    [ = ]       0  [NEW]    +288    g_icmp_connections_buffer
    [ = ]       0  [NEW]    +216    g_last_regs
    [ = ]       0  [NEW]    +112    g_sigactions
    [ = ]       0 -98.5%     +96    [54 Others]
    [ = ]       0  [NEW]     +96    g_cbprealloc_buffer
    [ = ]       0  [NEW]     +64    g_tasklisttable
    [ = ]       0   +75%     +60    g_bbsram
    [ = ]       0  [DEL]     -64    g_iobuserstats
    [ = ]       0  [DEL]    -224    g_icmp_connections
    [ = ]       0  [DEL]    -384    g_cbprealloc
    [ = ]       0  [DEL]    -448    g_dns_cache
    [ = ]       0  [DEL]    -704    g_udp_connections
    [ = ]       0  [DEL] -1.22Ki    g_wrbuffer
    [ = ]       0  [DEL] -1.50Ki    g_tcp_connections
    [ = ]       0  [DEL] -4.88Ki    g_iob_pool
  +3.7% +73.0Ki  [ = ]       0    .debug_abbrev
  +0.9% +1.49Ki  [ = ]       0    .debug_aranges
  +1.0% +4.66Ki  [ = ]       0    .debug_frame
  +4.0% +1.10Mi  [ = ]       0    .debug_info
  +2.8%  +130Ki  [ = ]       0    .debug_line
  +2.5%     +10  [ = ]       0    .debug_line_str
  +1.0% +37.4Ki  [ = ]       0    .debug_loclists
    [NEW]      +2  [ = ]       0    [Unmapped]
    +1.0% +37.4Ki  [ = ]       0    [section .debug_loclists]
  +0.8% +4.86Ki  [ = ]       0    .debug_rnglists
    [DEL]      -3  [ = ]       0    [Unmapped]
    +0.8% +4.87Ki  [ = ]       0    [section .debug_rnglists]
  +0.1% +4.86Ki  [ = ]       0    .debug_str
    [NEW]      +2  [ = ]       0    [Unmapped]
    +0.1% +4.85Ki  [ = ]       0    [section .debug_str]
  -0.1%    -364  [ = ]       0    .strtab
    [DEL]     -10  [ = ]       0    CSWTCH.45
    [DEL]      -9  [ = ]       0    CSWTCH.5
   -101.8%    -141  [ = ]       0    [868 Others]
    -0.3%     -81  [ = ]       0    [section .strtab]
    [DEL]     -15  [ = ]       0    __FUNCTION__.0
    [DEL]     -15  [ = ]       0    __FUNCTION__.1
    [DEL]     -15  [ = ]       0    __FUNCTION__.2
    [DEL]     -15  [ = ]       0    __FUNCTION__.3
    [DEL]     -15  [ = ]       0    __FUNCTION__.4
    [DEL]     -15  [ = ]       0    __FUNCTION__.5
    [DEL]     -26  [ = ]       0    ____aeabi_uldivmod_veneer
    [NEW]     +18  [ = ]       0    ____assert_veneer
    [NEW]     +21  [ = ]       0    __arm_ack_irq_veneer
    [DEL]     -27  [ = ]       0    __arm_switchcontext_veneer
    [DEL]     -19  [ = ]       0    __arp_arpin_veneer
    [NEW]     +19  [ = ]       0    __arp_input_veneer
    [DEL]     -18  [ = ]       0    __arp_ipin_veneer
    [DEL]     -17  [ = ]       0    __arp_out_veneer
    [NEW]      +9  [ = ]       0    __assert
    [DEL]     -29  [ = ]       0    __clock_abstime2ticks_veneer
    [NEW]     +36  [ = ]       0    __clock_increase_sched_ticks_veneer
  -0.2% -1.02Ki  [ = ]       0    .symtab
   -25.0%     -16  [ = ]       0    AM32Settings::decodeInfoResponse()
     +33%     +16  [ = ]       0    AuterionAutostarter::is_eeprom_header_valid()
   -50.0%     -16  [ = ]       0    AuterionAutostarter::start()
    +100%     +32  [ = ]       0    CSWTCH.42
    [DEL]     -32  [ = ]       0    CSWTCH.45
    [DEL]     -32  [ = ]       0    CSWTCH.5
    +100%     +16  [ = ]       0    CdcAcmAutostart::execute_process()
   -25.0%     -16  [ = ]       0    CdcAcmAutostart::scan_buffer_for_carriage_returns()
   -50.0%     -16  [ = ]       0    MavlinkStream::update()
     +17%     +16  [ = ]       0    MavlinkStreamServoOutputRaw<>::new_instance()
   -33.3%     -16  [ = ]       0    PX4IO::updateDisarmed()
    +100%     +16  [ = ]       0    PX4IO::updateFailsafe()
   -25.0%     -32  [ = ]       0    Sih::Sih()
   -102.9% -1.20Ki  [ = ]       0    [1210 Others]
    +4.6%    +528  [ = ]       0    [section .symtab]
    [DEL]     -80  [ = ]       0    __FUNCTION__.0
    [DEL]     -48  [ = ]       0    __FUNCTION__.1
    [DEL]     -32  [ = ]       0    __FUNCTION__.2
    [DEL]     -32  [ = ]       0    __FUNCTION__.3
    [DEL]     -32  [ = ]       0    __FUNCTION__.4
    [DEL]     -32  [ = ]       0    __FUNCTION__.5
  -9.3%    -952  [ = ]       0    [Unmapped]
  -5.3%    -776  -5.3%    -776    .ramfunc
    +139%    +100  +139%    +100    nxsched_add_readytorun
     +13%     +76   +13%     +76    stm32_interrupt_work
    +120%     +72  +120%     +72    wd_timer
    +133%     +64  +133%     +64    arm_doirq
    +214%     +60  +214%     +60    nxsched_remove_blocked
     +93%     +56   +93%     +56    ioctl
    +120%     +48  +120%     +48    nxsched_remove_readytorun
     +11%     +44   +11%     +44    stm32_i2c_isr
   -100.6%     -32 -100.6%     -32    [74 Others]
    [DEL]     -40  [DEL]     -40    nxsched_add_blocked
   -97.8%     -44 -97.8%     -44    [section .ramfunc]
   -91.7%     -44 -91.7%     -44    arm_svcall
    [DEL]     -44  [DEL]     -44    sq_rem
    [DEL]     -64  [DEL]     -64    nxsched_add_prioritized
   -51.3%     -80 -51.3%     -80    nxsem_post
    [DEL]     -84  [DEL]     -84    up_unblock_task
    [DEL]    -112  [DEL]    -112    up_block_task
   -88.9%    -128 -88.9%    -128    memset
    [DEL]    -184  [DEL]    -184    wd_start
   -35.6%    -188 -35.6%    -188    memcpy
    [DEL]    -252  [DEL]    -252    nxsig_timedwait
  +3.0% +1.35Mi  +0.2% +3.79Ki    TOTAL

px4_fmu-v6x [Total VM Diff: 5872 byte (0.29 %)]
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +2.14Ki  +0.1% +2.14Ki    .text
   -94.8% +8.19Ki -94.8% +8.19Ki    [1661 Others]
    [NEW] +2.03Ki  [NEW] +2.03Ki    vscanf_internal
    [NEW]    +936  [NEW]    +936    strtox.isra.0
    [NEW]    +912  [NEW]    +912    uart_readv
   +57e2%    +684 +57e2%    +684    _assert
    [NEW]    +628  [NEW]    +628    nsh_argument.isra.0
    [NEW]    +610  [NEW]    +610    mmcsd_sdinitialize
    [NEW]    +484  [NEW]    +484    uart_writev
    [NEW]    +390  [NEW]    +390    fat_get_sectors
    [DEL]    -352  [DEL]    -352    telnetd_daemon
   -98.9%    -364 -98.9%    -364    strtod
   -46.8%    -376 -46.8%    -376    mmcsd_probe
    [DEL]    -390  [DEL]    -390    nx_poll
    [DEL]    -492  [DEL]    -492    uart_read
    [DEL]    -532  [DEL]    -532    up_assert
    [DEL]    -588  [DEL]    -588    cmd_ifconfig
    [DEL]    -940  [DEL]    -940    ps_callback
    [DEL] -1.24Ki  [DEL] -1.24Ki    nsh_argument
    [DEL] -1.71Ki  [DEL] -1.71Ki    proc_read
   -98.9% -1.79Ki -98.9% -1.79Ki    lib_vscanf
    -2.5% -3.93Ki  -2.5% -3.93Ki    [section .text]
   +44% +2.05Ki   +44% +2.05Ki    .data
    +170%    +544  +170%    +544    g_sdmmcdev2
   -56.2%    +452 -56.2%    +452    [45 Others]
    +460%     +92  +460%     +92    g_hpwork
    +460%     +92  +460%     +92    g_lpwork
    [NEW]     +88  [NEW]     +88    g_wrbuffer
     +26%     +60   +26%     +60    g_uart4priv
     +26%     +60   +26%     +60    g_uart5priv
     +26%     +60   +26%     +60    g_uart7priv
     +26%     +60   +26%     +60    g_uart8priv
     +26%     +60   +26%     +60    g_usart1priv
     +26%     +60   +26%     +60    g_usart2priv
     +26%     +60   +26%     +60    g_usart3priv
     +26%     +60   +26%     +60    g_usart6priv
     +57%     +52   +57%     +52    g_spi1dev
    [NEW]     +44  [NEW]     +44    g_cbprealloc
    [NEW]     +44  [NEW]     +44    g_icmp_connections
    [NEW]     +44  [NEW]     +44    g_tcp_connections
    [NEW]     +44  [NEW]     +44    g_udp_connections
    [NEW]     +40  [NEW]     +40    g_devno_lock
    [NEW]     +40  [NEW]     +40    g_free_lock
    +250%     +40  +250%     +40    g_inode_lock
  [ = ]       0  +1.6% +1.55Ki    .bss
    [ = ]       0  [NEW] +4.88Ki    g_iob_buffer
    [ = ]       0  [NEW] +1.91Ki    g_tcp_connections_buffer
    [ = ]       0  [NEW] +1.28Ki    g_kthread_group
    [ = ]       0  [NEW] +1.25Ki    g_wrbuffer_buffer
    [ = ]       0  [NEW]    +704    g_udp_connections_buffer
    [ = ]       0  [NEW]    +448    g_sigpool
    [ = ]       0  [NEW]    +288    g_icmp_connections_buffer
    [ = ]       0 -95.9%    +228    [54 Others]
    [ = ]       0  [NEW]    +216    g_last_regs
    [ = ]       0  [NEW]    +112    g_sigactions
    [ = ]       0  [NEW]     +96    g_cbprealloc_buffer
    [ = ]       0   +76%     +64    g_bbsram
    [ = ]       0  [DEL]     -64    g_iobuserstats
    [ = ]       0  [DEL]    -224    g_icmp_connections
    [ = ]       0  [DEL]    -384    g_cbprealloc
    [ = ]       0  [DEL]    -448    g_dns_cache
    [ = ]       0  [DEL]    -512    sdmmc_rxbuffer
    [ = ]       0  [DEL]    -704    g_udp_connections
    [ = ]       0  [DEL] -1.22Ki    g_wrbuffer
    [ = ]       0  [DEL] -1.50Ki    g_tcp_connections
    [ = ]       0  [DEL] -4.88Ki    g_iob_pool
  +4.9% +91.6Ki  [ = ]       0    .debug_abbrev
  +1.1% +1.73Ki  [ = ]       0    .debug_aranges
  +1.1% +5.08Ki  [ = ]       0    .debug_frame
  +4.7% +1.24Mi  [ = ]       0    .debug_info
  +3.1%  +140Ki  [ = ]       0    .debug_line
   -66.7%      -2  [ = ]       0    [Unmapped]
    +3.1%  +140Ki  [ = ]       0    [section .debug_line]
  +2.5%     +10  [ = ]       0    .debug_line_str
  +1.1% +39.8Ki  [ = ]       0    .debug_loclists
  +0.9% +5.15Ki  [ = ]       0    .debug_rnglists
  +0.2% +5.20Ki  [ = ]       0    .debug_str
    [NEW]      +2  [ = ]       0    [Unmapped]
    +0.2% +5.20Ki  [ = ]       0    [section .debug_str]
  -0.4%      -1  [ = ]       0    .shstrtab
  +0.0%    +153  [ = ]       0    .strtab
    [DEL]     -10  [ = ]       0    CSWTCH.45
    [DEL]      -9  [ = ]       0    CSWTCH.5
   -96.9%    +219  [ = ]       0    [825 Others]
    +0.3%     +76  [ = ]       0    [section .strtab]
    [DEL]     -15  [ = ]       0    __FUNCTION__.0
    [DEL]     -15  [ = ]       0    __FUNCTION__.1
    [DEL]     -15  [ = ]       0    __FUNCTION__.2
    [DEL]     -15  [ = ]       0    __FUNCTION__.3
    [DEL]     -15  [ = ]       0    __FUNCTION__.4
    [DEL]     -15  [ = ]       0    __FUNCTION__.5
    [NEW]      +9  [ = ]       0    __assert
     +28%      +9  [ = ]       0    __orb_position_controller_landing_status
   -81.8%      -9  [ = ]       0    __start
    [DEL]     -15  [ = ]       0    _net_timedwait
   -45.7%     -16  [ = ]       0    _vectors
    [NEW]      +7  [ = ]       0    adjust
    [NEW]     +15  [ = ]       0    arc4random_buf
    [NEW]     +19  [ = ]       0    arm_color_intstack
    [DEL]     -15  [ = ]       0    arm_dump_stack
    [DEL]     -14  [ = ]       0    arm_dump_task
    [DEL]     -23  [ = ]       0    arm_fullcontextrestore
  -0.0%    -192  [ = ]       0    .symtab
   -25.0%     -16  [ = ]       0    AM32Settings::decodeInfoResponse()
    +100%     +32  [ = ]       0    CSWTCH.42
    [DEL]     -32  [ = ]       0    CSWTCH.45
    [DEL]     -32  [ = ]       0    CSWTCH.5
    +100%     +16  [ = ]       0    CdcAcmAutostart::execute_process()
   -25.0%     -16  [ = ]       0    CdcAcmAutostart::scan_buffer_for_carriage_returns()
   -25.0%     -16  [ = ]       0    Mavlink::handleCommands()
    +100%     +16  [ = ]       0    Mavlink::publish_telemetry_status()
    +100%     +16  [ = ]       0    MavlinkReceiver::component_was_seen()
   -33.3%     -16  [ = ]       0    MavlinkReceiver::handle_message_open_drone_id_system()
   -50.0%     -16  [ = ]       0    MavlinkStream::update()
     +17%     +16  [ = ]       0    MavlinkStreamServoOutputRaw<>::new_instance()
   -33.3%     -16  [ = ]       0    PX4IO::updateDisarmed()
    +100%     +16  [ = ]       0    PX4IO::updateFailsafe()
   -100.1%     -48  [ = ]       0    [1150 Others]
    +1.5%    +176  [ = ]       0    [section .symtab]
    [DEL]    -128  [ = ]       0    __FUNCTION__.0
    [DEL]     -48  [ = ]       0    __FUNCTION__.1
    [DEL]     -32  [ = ]       0    __FUNCTION__.2
    [DEL]     -32  [ = ]       0    __FUNCTION__.3
    [DEL]     -32  [ = ]       0    __FUNCTION__.4
   +25%     +32  [ = ]       0    [ELF Program Headers]
 -31.5% -2.17Ki  [ = ]       0    [Unmapped]
  +3.5% +1.52Mi  +0.3% +5.73Ki    TOTAL

Updated: 2026-06-05T08:52:20

@PX4 PX4 deleted a comment from github-actions Bot May 22, 2026
@PX4 PX4 deleted a comment from github-actions Bot May 22, 2026
@PX4 PX4 deleted a comment from github-actions Bot May 22, 2026
@@ -371,7 +371,7 @@ typedef struct {
int pid; /* Process ID */
uint32_t regs[XCPTCONTEXT_REGS]; /* Interrupt register save area */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[error] clang-diagnostic-error [error]
use of undeclared identifier XCPTCONTEXT_REGS

@jlaitine
Copy link
Copy Markdown
Contributor

jlaitine commented May 29, 2026

@PetervdPerk-NXP : Here is a fix for the MacOS build w. the new nuttx: tiiuae@99035c5

EDIT: I created a separate PR directly against upstream for these build issues, they are mechanical and can be reviewed & merged separately and beforehand: #27509

@jlaitine
Copy link
Copy Markdown
Contributor

jlaitine commented Jun 2, 2026

@PetervdPerk-NXP , @dakejahl : I see that there are some issues with flash consumption with the new nuttx and the latest PX4 additions. I have a bunch of potential NuttX size optimizations and also one small PX4 size optimization at hand. I will push them somewhere for reference... I think we can save some 2k from NuttX and another 2k from PX4 with ease. Perhaps I will make a separate PR for PX4 size optimization, and push PR:s for upstream NuttX for the nuttx size optimizations, and add links here.

EDIT: Here is a PR for PX4, quick fix saving some 2KB: #27546
EDIT2: Here is a small 600B MTD fix for nuttx: apache/nuttx#19018 (Note, doesn't cherry-pick cleanly on 12.12, there is one-line diff with current nuttx upstream. Easy to backport though.)
EDIT3: Here is a small 300B size reduction for sdio driver: apache/nuttx#19020
EDIT4: This gives 1-3 KB, depending on configuration : apache/nuttx#19024

Let's see what is the reception in nuttx side for those, the last one might be a bit intrusive !

@jlaitine
Copy link
Copy Markdown
Contributor

jlaitine commented Jun 4, 2026

I can try to fix the remaining clang-tidy issue, unless you are already doing that @PetervdPerk-NXP ? I missed the remaining CDev one previously.

Also, for example holybro_kakutef7 still suffers from image growth; the largest optimization which I did previously for the string formatters in NuttX doesn't help that one, because it is not using those (no "date" application nor bbsram storing...). Only the FTL/bad block management will save a bit extra, but it has still some 5K extra now after rebase where something was added to the PX4...

Fix for the CDev clang-tidy error: #27570

PetervdPerk-NXP and others added 7 commits June 5, 2026 10:43
Update git sha's for NuttX
bootloader: update main prototype for NuttX 12.12.0

platforms/nuttx: Add wrapper for queue.h

For some reason the queue.h header was moved, add this wrapper so
posix and nuttx builds can both still use #include <queue.h>

Fix print_load to be compatible with upstream NuttX

Also Change tg_filelist -> tg_fdlist as per new NuttX

Co-authored-by: Ville Juven <ville.juven@unikie.com>
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
sitl: fix NuttX 11.12.0 upgrade regressions

drivers: uavcan: fix TFLM c library conflict

With NuttX 12.12.0 the TFLM c library causes a conflict
boards: Disable MMC_IOC_CMD ioctl

NuttX default is Y, but it's not used

boards: Fix meminfo/free

boards: fix libc float setting

boards: Reduce flash usage

Using strerr short mode
Don't cache DNS entries (also saves some ram)

fix(boards): kakutef7 disable optical flow ekf2 to save flash

kakutef7 overflows with nuttx 12.12.0 also it doesn't have optical
flow drivers anyhow. Thus disable ekf2 optical flow
NuttX 12.12 changed symbols for certain calls or inlined them.
Fix a protected kernel link failure caused by static initialization
of a shared uORB::Publication in AM32Settings. Which is problematic
for NuttX 12.12.0.

The NuttX 12.12 PX4 protected kernel does not provide __dso_handle.
@jlaitine
Copy link
Copy Markdown
Contributor

jlaitine commented Jun 5, 2026

The remaining build errors seem to be on

  • aedrox_aedroxh7_default ; this is simple, just needs in defonfig:
-CONFIG_BOARD_CRASHDUMP=y
+CONFIG_BOARD_CRASHDUMP_CUSTOM=y
+CONFIG_FILE_STREAMS=y
  • holybro_kakutef7_default
  • px4_fmu-v5_protected

I'll try to claw out the rest of the needed KBs for holybro_kakutef7 and px4_fmu-v5_protected. I have got some good candidates where to save from, and it is not super tricky. I try to refine these into upstreamable form early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:feature Request or change that adds new functionality. risk:safety-critical May affect arming, failsafe, control, navigation, or flight safety. scope:boards Board-specific changes or hardware definitions. scope:build-system CMake, Kconfig, board config, or build tooling. scope:control Rate, attitude, position, allocation, or actuator control. scope:dependencies Dependency or submodule updates. scope:drivers Device drivers and hardware interfaces. scope:mavlink MAVLink module, streams, commands, or protocol handling. scope:middleware DDS, ROS 2, Cyphal/UAVCAN, zenoh, or bridge layers. scope:navigation Missions, RTL, geofence, takeoff, landing, or navigator behavior. scope:offboard Offboard mode, external setpoints, companion-computer control, or offboard failsafe behavior. scope:parameters Parameter definitions, metadata, migration, or defaults.

Projects

None yet

Development

Successfully merging this pull request may close these issues.